<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    </style>
</head>
<body>

<h2 align="center" >用户登录</h2>
<div align="center">
    <form action="login" method="post"  style=" align-content: center">
        用户名：<input type="text" name="uname">
        <br>
        密&nbsp&nbsp&nbsp码：<input type="password" name="pwd">
        <br>
        验证码：<input type="text" name="code"   >
        <br>
        <img src="validatecode" alt="">

        <button type="button">看不清</button>
        <br>
        <input type="submit" value="提交">
        <input type="reset" name="重置">
        <script >
            var btn = document.querySelector("button");
            var codeImg = document.querySelector("img");

            btn.onclick = function () {
                codeImg.src = "validatecode?n="+Math.random();
            }
        </script>
    </form>

</div>


</body>
</html>